﻿<UserControls:ScrumUserControl x:Class="ScrumTable.UI.View.WinTouch.UserControls.View.ScrumMap"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:s="http://schemas.microsoft.com/surface/2008"
    xmlns:loc="clr-namespace:ScrumTable.UI.View.Localization;assembly=ScrumTable.UI.View" 
    xmlns:Converter="clr-namespace:ScrumTable.UI.View.Converter;assembly=ScrumTable.UI.View" xmlns:UserControls="clr-namespace:ScrumTable.UI.View.WinTouch.UserControls"
                               xmlns:CustomControl="clr-namespace:ScrumTable.UI.View.WinTouch.CustomControl"
                               xmlns:PlanningPoker="clr-namespace:ScrumTable.UI.View.WinTouch.UserControls.PlanningPoker"
                               Foreground="White" Background="{StaticResource ScrumMapBackground}" MinWidth="1028">
    <Grid>
        <Grid.Resources>
            <Converter:ConverterIsNull x:Key="IsNullConverter"/>
            <Style TargetType="{x:Type s:SurfaceButton}" x:Key="TileButtonBaseStyle" BasedOn="{StaticResource StyleFeedbackButton}">
                <Style.Setters>               
                    <Setter Property="Margin" Value="5"/>
                    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
                    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
                    <Setter Property="Padding" Value="0,0,0,0"/>
                    <Setter Property="IsEnabled" Value="{Binding ScrumData.CurrentIteration, Converter={StaticResource IsNullConverter}}"/>                    
                    <EventSetter Event="Click" Handler="OnGoToButtonClick"/>
                </Style.Setters>
            </Style>         

            <Style TargetType="{x:Type UserControl}" x:Key="ButtonEmpty" BasedOn="{x:Null}">
                <Style.Setters>
                    <Setter Property="Background" Value="White"/>
                    <Setter Property="BorderBrush" Value="Black"/>
                    <Setter Property="BorderThickness" Value="1"/>
                    <Setter Property="Margin" Value="5"/>
                    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
                    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
                </Style.Setters>
            </Style>



            <DataTemplate x:Key="listTemplate">
                <TextBlock HorizontalAlignment="Center" FontSize="16" FontWeight="Bold">
                        <TextBlock.Text>
                            <Binding Path="Name" />
                        </TextBlock.Text>
                </TextBlock>
            </DataTemplate>
        </Grid.Resources>
        <StackPanel HorizontalAlignment="Left" VerticalAlignment="Center"  Margin="0,100,0,0" >
            
        </StackPanel>

        <StackPanel HorizontalAlignment="Left" VerticalAlignment="Center" Width="377" Margin="0,500,0,0">
            <s:SurfaceButton  HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="40,100,0,0" Style="{StaticResource StyleFeedbackButton}" Click="OnGoToButtonClick" Name="SettingConfigNoWizard" Background="Transparent">
                <StackPanel Orientation="Horizontal" >
                    <Label Background="{StaticResource MenuIconConfigUser}" Width="48" Height="48"/>
                    <TextBlock Margin="7,0,0,0" FontSize="12" VerticalAlignment="Center" xml:space="preserve" Text="{loc:Translate Uid=MenuConfigConfig, Default=[Config]}"/>
                </StackPanel>
            </s:SurfaceButton>
            <s:SurfaceButton  HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="40,0,0,0" Style="{StaticResource StyleFeedbackButton}" Click="OnLogOutClicked" Background="Transparent">
                <StackPanel Orientation="Horizontal" >
                    <Label Background="{StaticResource IconLogOut}" Width="48" Height="48"/>
                    <TextBlock Margin="7,0,0,0" FontSize="12" VerticalAlignment="Center" xml:space="preserve" Text="{loc:Translate Uid=ScrumMap_LogOff, Default=[LogOut]}"/>
                </StackPanel>
            </s:SurfaceButton>
        </StackPanel>

        <CustomControl:ScrumTableScrollViewer HorizontalAlignment="Stretch" VerticalAlignment="Center" ScrollChanged="SurfaceScrollViewer_ScrollChanged" Margin="0,-150,0,0">                                  
            <Grid HorizontalAlignment="Stretch" VerticalAlignment="Center">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Style="{x:Null}" Width="1*"  MinWidth="40" />
                    <ColumnDefinition Style="{x:Null}" Width="Auto"/>
                    <ColumnDefinition Style="{x:Null}" Width="40"/>
                    <ColumnDefinition Style="{x:Null}" Width="Auto"/>
                    <ColumnDefinition Style="{x:Null}" Width="40"/>
                    <ColumnDefinition Style="{x:Null}" Width="Auto"/>
                    <ColumnDefinition Style="{x:Null}" Width="40"/>
                    <ColumnDefinition Style="{x:Null}" Width="Auto"/>
                    <ColumnDefinition Style="{x:Null}" Width="1*" MinWidth="40" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Style="{x:Null}"/>
                    <RowDefinition Style="{x:Null}"/>
                    <RowDefinition Style="{x:Null}"/>
                    <RowDefinition Style="{x:Null}"/>
                </Grid.RowDefinitions>
                <Grid.Resources>
                    <Style TargetType="{x:Type ColumnDefinition}" >
                        <Style.Setters>
                            <Setter Property="Width" Value="127"/>
                            <Setter Property="MaxWidth" Value="127"/>
                            <Setter Property="MinWidth" Value="127"/>
                        </Style.Setters>
                    </Style>

                    <Style TargetType="{x:Type RowDefinition}" >
                        <Style.Setters>
                            <Setter Property="Height" Value="127"/>
                            <Setter Property="MaxHeight" Value="127"/>
                            <Setter Property="MinHeight" Value="127"/>
                        </Style.Setters>
                    </Style>
                </Grid.Resources>

            
                <StackPanel Grid.Row="0" Grid.Column="7" Grid.ColumnSpan="1" Margin="0,0,0,0" HorizontalAlignment="Stretch" >
                    <Label Style="{StaticResource DescriptionLabel}" HorizontalAlignment="Left" Content="{loc:Translate Uid=ProjectSettings_Sprint,Default=[Sprint]}"/>
                    <ComboBox Background="Transparent" HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" BorderBrush="Transparent" Margin="0"   SelectedItem="{Binding Path=ScrumData.CurrentIteration, Mode=TwoWay}" ItemsSource="{Binding Path=ScrumData.CurrentProject.Iterations}" Grid.Column="2" ItemTemplate="{StaticResource listTemplate}"  />                    
                </StackPanel>                 

                <Rectangle Fill="Black" Grid.Row="1" Grid.Column="5" Grid.ColumnSpan="3"  VerticalAlignment="Bottom" Height="1" Stroke="Black" Margin="0,10,0,45" />

                <Label FontSize="30" FontWeight="Bold" xml:space="preserve" Grid.Column="1" Grid.Row="2" Content="{loc:Translate Uid=ScrumMap_Partners, Default=[Partner]}"/>
                <Label FontSize="30" FontWeight="Bold" xml:space="preserve" Grid.Column="3" Grid.Row="2"  Content="{loc:Translate Uid=ScrumMap_Project, Default=[Project]}"/>
                <Label FontSize="30" FontWeight="Bold" xml:space="preserve" Grid.Column="5" Grid.Row="2" Content="{loc:Translate Uid=ScrumMap_Sprint, Default=[Sprint]}"/>
                <Label FontSize="30" FontWeight="Bold" xml:space="preserve"  Grid.Column="7" Grid.Row="2" Content="{loc:Translate Uid=ScrumMap_Daily, Default=[Daily]}"/>


                <Grid Background="Transparent" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="1" Grid.Row="3">
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Grid.Resources>                      
                    </Grid.Resources>
         
                    <s:SurfaceButton Style="{StaticResource TileButtonBaseStyle}" Click="NavigateHsrWebsite"  Grid.Column="0"  Grid.ColumnSpan="2" Grid.Row="0" >
                        <Border  BorderBrush="Black" BorderThickness="1" Background="White">
                            <Image IsHitTestVisible="False" Source="{StaticResource HSRLogo}" Stretch="Uniform" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="20"/>
                        </Border>               
                    </s:SurfaceButton>
                        
                    <s:SurfaceButton Style="{StaticResource TileButtonBaseStyle}" Click="NavigateIfsWebsite"  Grid.Column="0"  Grid.ColumnSpan="2" Grid.Row="1" >
                        <Border  BorderBrush="Black" BorderThickness="1" Background="White">
                            <Image IsHitTestVisible="False" Source="{StaticResource BrandedLogo}" Stretch="Uniform" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="20"/>
                        </Border>               
                    </s:SurfaceButton>
                    
                </Grid>
                
                <Grid Background="Transparent" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="3" Grid.Row="3">
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Grid.Resources>
                        <Style TargetType="{x:Type s:SurfaceButton}" BasedOn="{StaticResource TileButtonBaseStyle}">              
                            <Style.Setters>                              
                                <Setter Property="Background" >
                                    <Setter.Value>
                                     	<LinearGradientBrush EndPoint="1,0.5" StartPoint="0.0,0.5">
					                        <GradientStop Color="DarkOrange"/>
					                        <GradientStop Color="#E5FF8C00" Offset="1"/>
				                        </LinearGradientBrush>
                                    </Setter.Value>
                                 </Setter>                                
                            </Style.Setters>
                        </Style>
                    </Grid.Resources>

                    <s:SurfaceButton Grid.ColumnSpan="2" Name="ProjectPlanningUserStories">
                       <Grid>
                          <UserControl Width="100" Height="62" HorizontalAlignment="Left" >
                              <UserControl Background="{StaticResource IconScrumMapRanking}" />
                           </UserControl>
                           <TextBlock  Style="{StaticResource StyleLabelBig}" Text="{loc:Translate Uid=MenuProjectPlanningRanking, Default=[StackRanking]}" />
                        </Grid>                                             
                    </s:SurfaceButton>
                    <s:SurfaceButton Grid.ColumnSpan="2" Grid.Row="1" Name="ProjectPlanningIterations">
                       <Grid>
                          <UserControl Width="100" Height="62" HorizontalAlignment="Left" >
                              <UserControl Background="{StaticResource IconScrumMapSprintOverview}"/>
                           </UserControl>
                           <TextBlock  Style="{StaticResource StyleLabelBig}" Text="{loc:Translate Uid=MenuProjectPlanningSprints, Default=[MenuProjectPlanningSprints]}" />
                        </Grid>         
                    </s:SurfaceButton>
                    <UserControl Grid.ColumnSpan="1" Grid.Row="2" Style="{StaticResource ButtonEmpty}" />
                </Grid>

                <Grid Background="Transparent" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="5"  Grid.Row="3">
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Grid.Resources>
                        <Style TargetType="{x:Type s:SurfaceButton}" BasedOn="{StaticResource TileButtonBaseStyle}">                          
                              <Style.Setters>                              
                                <Setter Property="Background" >
                                    <Setter.Value>
                                     	<LinearGradientBrush EndPoint="1,0.5" StartPoint="0.0,0.5">
					                        <GradientStop Color="LimeGreen"/>
					                        <GradientStop Color="#E532CD32" Offset="1"/>
				                        </LinearGradientBrush>
                                    </Setter.Value>
                                 </Setter>                                
                            </Style.Setters>
                        </Style>
                    </Grid.Resources>
                    <s:SurfaceButton Grid.ColumnSpan="2" Name="SprintPlanningTask">
                        <Grid >
                            <UserControl Width="100" Height="62" HorizontalAlignment="Left" >
                                <UserControl Background="{StaticResource IconScrumMapSprintPlanning}"/>
                             </UserControl>
                            <TextBlock  Style="{StaticResource StyleLabelBig}" Text="{loc:Translate Uid=MenuSprintPlanning, Default=[Planning Meeting 12]}" />
                        </Grid>
                    </s:SurfaceButton>
                    <s:SurfaceButton Grid.ColumnSpan="1" Grid.Row="1" Name="ProjectPlanningScrumPoker" >
                        <Grid>
                            <UserControl Background="{StaticResource IconScrumMapScrumPoker}" />
                            <TextBlock Style="{StaticResource StyleLabel}" Text="{loc:Translate Uid=MenuProjectPlanningScrumPoker, Default=[ScrumPoker]}"/>
                        </Grid>
                    </s:SurfaceButton>
                    <UserControl Grid.Column="1" Grid.Row="1" Style="{StaticResource ButtonEmpty}"  />                        
                    <UserControl Grid.ColumnSpan="2" Grid.Row="2" Style="{StaticResource ButtonEmpty}"/>
                </Grid>


                <Grid Background="Transparent" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="7"  Grid.Row="3">
                    <Grid.Resources>
                        <Style TargetType="{x:Type s:SurfaceButton}" BasedOn="{StaticResource TileButtonBaseStyle}">
                            <Style.Setters>                              
                                <Setter Property="Background" >
                                    <Setter.Value>
                                     	<LinearGradientBrush EndPoint="1,0.5" StartPoint="0.0,0.5">
					                        <GradientStop Color="DarkMagenta"/>
					                        <GradientStop Color="#E58B008B" Offset="1"/>
				                        </LinearGradientBrush>
                                    </Setter.Value>
                                 </Setter>                                
                            </Style.Setters>
                        </Style>
                    </Grid.Resources>
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>

                    <s:SurfaceButton Grid.ColumnSpan="2" Name="DailyScrumIndividualReport" >
                        <Grid>
                            <UserControl Width="100" Height="62" HorizontalAlignment="Left" >
                                <UserControl Background="{StaticResource IconScrumMapIndividual}"/>
                             </UserControl>
                            <TextBlock  Style="{StaticResource StyleLabelBig}" Text="{loc:Translate Uid=MenuDailyScrumIndividualReport, Default=[Individual Report]}" />
                        </Grid>                        
                    </s:SurfaceButton>
                    
                    <s:SurfaceButton Grid.ColumnSpan="1" Grid.Row="1" Name="DailyScrumTaskBoard">
                        <Grid>
                            <UserControl Background="{StaticResource IconScrumMapTaskBoard}" Width="74" Height="61" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                            <TextBlock Style="{StaticResource StyleLabel}" Text="{loc:Translate Uid=MenuDailyScrumTaskBoard, Default=[TaskBoard]}"/>
                         </Grid>
                    </s:SurfaceButton>
                    <s:SurfaceButton Grid.Column="1" Grid.Row="1" Name="DailyScrumStoryBoard" >
                        <Grid>
                            <UserControl Background="{StaticResource IconScrumMapStoryBoard}" Width="80" Height="61"/>
                            <TextBlock Style="{StaticResource StyleLabel}" Text="{loc:Translate Uid=MenuDailyScrumStoryBoard, Default=[StoryBoard]}"/>
                         </Grid>                           
                    </s:SurfaceButton>
                    <s:SurfaceButton Grid.ColumnSpan="2" Grid.Row="2" Name="DailyScrumBoard" >                        
                         <Grid>
                            <UserControl Width="100" Height="62" HorizontalAlignment="Left" >
                                <UserControl Background="{StaticResource IconScrumMapScrumBoard}"/>
                             </UserControl>
                            <TextBlock  Style="{StaticResource StyleLabelBig}" Text="{loc:Translate Uid=MenuDailyScrumBoard, Default=[ScrumBoard Board]}"/>
                        </Grid>                                                                    
                    </s:SurfaceButton>
                </Grid>
            </Grid>
        </CustomControl:ScrumTableScrollViewer> 
    </Grid>
</UserControls:ScrumUserControl>

    